<?php
/*
*  -------------------------------------------------
*   @file		: .php
*   @link		:CPC  www.chinapet.com
*   @copyright	: 2002-2012 Xingmo Inc
*   @author		: Laipiyang <462166282@qq.com>
*   @blog_url   : http://www.icuir.com/
*   @blog_url   : http://blog.sina.com.cn/xmphp
*   @date		:
*   @update		:
*  -------------------------------------------------
*/
require "./include/init.inc.php";
require "./include/model.cls.php";
require "./include/cpc_qplus.cls.php";
$model=new model_sql();
if(empty($s))
{
	$s='home';
}
$kk=empty($_GET['kk']) ? 'is_new' : trim($_GET['kk']);


$sql="SELECT * FROM `info_q_usual_sort` WHERE `type`='3' AND `is_enable`='1'  LIMIT 4";
$sort=$db->fetch_all($sql);

if($kk=='is_new')
{
	$sql="SELECT * FROM `info_q_scene`  ORDER BY `dateline` DESC LIMIT 5";
	$query=$db->fetch_all($sql);
	if(!$query)
	{
		exit('3');
	}
	foreach ($query as $key => $val )
	{
			$dir='upload/scene/'.$val['photo'];
			if(!empty($dir))
			{
				  $query[$key]['imgs']=$dir;
			}
	}
	echo '<pre>';
	print_r ($query);
	echo '</pre>';
}
$smarty->assign('scene_list',$query);
$smarty->assign('scene_sort',			$sort);
fheader('scene/'.$s.'.css');
$smarty->display('scene/'.$s.'.dwt');
ffooter();
//传道具分类


?>